{% extends 'base_user_center.html' %}
{% load static from staticfiles %}
{% block page_title %}个人信息{% endblock page_title %}
{% block right_content %}
		<div class="right_content clearfix">
				<div class="info_con clearfix">
				<h3 class="common_title2">基本信息</h3>
						<ul class="user_info_list">
							<li><span>用户名：</span>{{ user.username }}</li>
							<li><span>联系方式：</span>{{ address.phone }}</li>
							<li><span>联系地址：</span>{{ address.addr }}</li>
						</ul>
				</div>

				<h3 class="common_title2">最近浏览</h3>
				<div class="has_view_list">
					<ul class="goods_type_list clearfix">
				        {# 遍历显示用户最新浏览的商品的信息 #}
                        {% for sku in skus %}
				            <li>
                                <a href="{% url 'goods:detail' sku.id %}"><img src="{{ sku.image.url }}"></a>
                                <h4><a href="{% url 'goods:detail' sku.id %}">{{ sku.name }}</a></h4>
                                <div class="operate">
                                    <span class="prize">￥{{ sku.price }}</span>
                                    <span class="unit">{{ sku.price }}/{{ sku.unite }}</span>
                                    <a href="#" class="add_goods" title="加入购物车"></a>
                                </div>
                            </li>
                        {% empty %}
                            <li>暂无历史浏览记录</li>
                        {% endfor %}
			</ul>
		</div>
		</div>
	</div>

{% endblock right_content %}


